<div class="panel panel-default">
  <div class="panel-heading" data-toggle="collapse" data-target="#collapseFive">
    <h4 class="panel-title">
      <a data-toggle="collapse" data-parent="#accordion" href="#collapseFive">
        Phishing Options
      </a>
    </h4>
  </div>
  <div id="collapseFive" class="panel-collapse collapse">
    <div class="panel-body">
      <%= f.fields_for :campaign_settings, @campaign.campaign_settings do |ff| %>
      <div class="row">
        <div class="col-xs-3">
          <p>SMTP Sending Delay:</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='Some spam filters will flag the emails as spam if they are sent too fast. This option allows you to provide a delay between each email. Note this will not work if you are configured to send emails in the background with sidekiq.'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.select(:smtp_delay, @campaign.campaign_settings.smtp_delays, {}, {class: 'form-control'}) %></td>
        </div>
      </div>

      <div class="row top-buffer">
        <div class="col-xs-3">
          <p>Track User Clicks?</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='Track User Clicks will append a unique identifier to the end of the phishing URL so each target that visits the website can be properly identified'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.check_box(:track_uniq_visitors) %>
        </div>
      </div>

      <div class="row top-buffer">
        <div class="col-xs-3">
          <p>Require UID?</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='This option will require that the UID parameter must be passed to the phishing site in order to view the contents of the phishing page. If this setting is enabled you will get a 404 error when viewing the page without a UID parameter'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.check_box(:require_uid) %>
        </div>
      </div>

      <div class="row top-buffer">
        <div class="col-xs-3">
          <p>Directory Indexing Enabled?</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='This option will configure apache virtualhost with directory indexing enabled on any folder missing the html index.'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.check_box(:directory_index) %>
        </div>
      </div>

      <div class="row top-buffer">
        <div class="col-xs-3">
          <p>Robots.txt Disallow?</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='This option will drop a robots.txt file within the root of the phishing site which will disallow / to preven spiders the play nicely'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.check_box(:robots_block) %>
        </div>
      </div>

      <div class="row top-buffer">
        <div class="col-xs-3">
          <p>Password Storage?</p>
        </div>
        <div class="col-xs-1">
          <span class="glyphicon glyphicon-question-sign" title='This will modify if the campaign is able to store raw passwords or not. When password storage is disabled JavaScript will be added to the phishing site which will convert the password into a meta-password in realtime while the user types. If a raw password does end up getting sent to the results API, it will be modified to password: MASKED value to ensure passwords are not stored in the database'></span>
        </div>
        <div class="col-xs-8">
          <%= ff.check_box(:password_storage) %>
        </div>
      </div>

    <div class="row top-buffer">
      <div class="col-xs-3">
        <p>Use BeeF?</p>
      </div>
      <div class="col-xs-1">
        <span class="glyphicon glyphicon-question-sign" title='Hook Browsers when targets land on your phishing website. Each php website file will be taged with the javascript required to hook target browsers. Must be running beef service to hook properly'></span>
      </div>
      <div class="col-xs-8">
        <%= ff.check_box(:use_beef) %>
      </div>
    </div>

    <div id="beef-url" class="row top-buffer">
      <div class="col-xs-3">
        <p>BeeF Hook URL:</p>
      </div>
      <div class="col-xs-1">
        <span class="glyphicon glyphicon-question-sign" title='Hook Browsers when targets land on your phishing website. Each php website file will be taged with the javascript required to hook target browsers. Must be running beef service to hook properly'></span>
      </div>
      <div class="col-xs-8">
        <%= ff.text_field(:beef_url, value: GlobalSettings.first.beef_url, class: 'form-control') %></td>
      </div>
    </div>

    <div class="row top-buffer">
      <div class="col-xs-3">
          <p>Use SSL?</p>
      </div>
      <div class="col-xs-1">
        <span class="glyphicon glyphicon-question-sign" title='Run your phishing website on SSL will require you already have valid signed certificates available for upload'></span>
      </div>
      <div class="col-xs-8">
        <%= ff.check_box(:ssl) %>
      </div>
    </div>

    <div id="ssl-row" class="row top-buffer">
      <div class="col-xs-3">
        <p>SSL Files</p>
      </div>
      <div class="col-xs-1">
        <span class="glyphicon glyphicon-question-sign" title='Upload SSL files and assign proper functionto run HTTPS'></span>
      </div>
      <div class="col-xs-8">

      </div>
    </div>

    <%= f.fields_for :ssl, @campaign.ssl do |ff| %>
    <div id="ssl-row" class="row top-buffer">
      <div class="col-xs-4">
       <i><%= ff.object[:filename] if ff.object[:filename].present? %></i>
      </div>
      <div class="col-xs-4">
        <%= ff.file_field(:filename, class: 'form-control') %>
      </div>
      <div class="col-xs-4">
        <%= ff.select(:function, %w(SSLCertificateFile SSLCertificateKeyFile SSLCertificateChainFile), {}, {class: "form-control"}) %>
      </div>
    </div>
    <% end %>

    <% end %>
  </div>
</div>